<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		
		<script type="text/javascript">
			
			function Animate(){
				this.name = "动物"
				this.color="白色"
			}
			Animate.prototype.run = function(){
				console.log("运动")
			}
			
			function Dog(){
				Animate.call(this)
			}
			Dog.prototype = Animate.prototype
			Dog.prototype.constructor = Dog
			
			
			var d1 = new Dog()
			console.log(d1.name)
			d1.run()
			
			
		</script>
	</body>
</html>
